﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimCMS.Repository;
using SimCMS.Model;

namespace SimCMS.Manager
{
    class SimFoodmenuManager : ISimFoodmenuManager
    {
        public IRepository<SimFoodmenu> SimFoodmenuRepository { get; set; }

        public object Save(SimFoodmenu entity)
        {
            return this.SimFoodmenuRepository.Save(entity);
        }

        public void Delete(object id)
        {
            this.SimFoodmenuRepository.Delete(this.Get(id));
        }

        public SimFoodmenu Get(object id)
        {
            return this.SimFoodmenuRepository.Get(id);
        }

        public IList<SimFoodmenu> LoadAll()
        {
            return this.SimFoodmenuRepository.LoadAll();
        }

        public void Update(SimFoodmenu entity)
        {
            this.SimFoodmenuRepository.Update(entity);
        }

        public IList<SimFoodmenu> DistinctFoodMenu()
        {
            var FoodMenuList = this.SimFoodmenuRepository.FindByNamedQuery("Distinct", null, null);
           
                return FoodMenuList;
            
        }
    }
}
